using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Xml;

using JelleDruyts.BuildCop.Configuration;

namespace JelleDruyts.BuildCop.Test.Mocks
{
    internal class DerivedRuleElement : RuleElement
    {
        public static RuleElement Deserialize(string xml)
        {
            using (StringReader memoryReader = new StringReader(xml))
            using (XmlReader reader = XmlReader.Create(memoryReader))
            {
                DerivedRuleElement element = new DerivedRuleElement();
                reader.Read();
                element.DeserializeElement(reader);
                return element;
            }
        }

        // Make the base class method public through this derived class.
        public void DeserializeElement(XmlReader reader)
        {
            base.DeserializeElement(reader, false);
        }
    }
}